
import { create } from './create'
/**
 * 使构造函数继承另一个构造函数原型链上的方法
 * function People(name) {
    this._name = name;
   }
    People.prototype = {
        getName: function() {
            return this._name;
        }
    };
    function Student(name) {
        this._name = name;
    }
    inherits(Student, People);
    const s = new Student('RedHood');
    s.getName(); // -> 'RedHood'
 * @param {*} Class 子类
 * @param {*} SuperClass 父类
 */
export function inherits (Class, SuperClass) {
  Class.prototype = create(SuperClass.prototype);
}